﻿<%@page import="com.fzb.forum4j.po.WebSite"%>
<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String turl = request.getRequestURI();
	String kurl = request.getRequestURI();
	String url = request.getScheme() + "://" + request.getHeader("host")
			+ request.getContextPath();
	request.setAttribute("url", url+((Map<String,String>)application.getAttribute("webSite")).get("template")+"/public");
	request.setAttribute("home", url);
%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset="utf-8"/>
<link rel="shortcut icon" type="image/x-icon" href="${home}favicon.ico" />
<meta name="description" content="${webs.description}"/>

<title><s:property value="%{#application.webSite.title}"/></title>
<link type="text/css" href="${url}/style.css" rel="stylesheet"  media="all"/>
<link type="text/css" id="page-list-style-css" href="${url}/css/page-list.css" rel="stylesheet"  media="all"/>
<link type="text/css" rel="stylesheet" href="${home }/include/plugs/SyntaxHighlighter/styles/shCoreDefault.css" />
<script type="text/javascript" src="${url}/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${url}/js/html5.js"></script> 
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushCpp.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushCSharp.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushJava.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushSql.js"></script>
<script type="text/javascript" src="${home }/include/plugs/SyntaxHighlighter/scripts/shBrushXml.js"></script>
<script type="text/javascript">SyntaxHighlighter.defaults['toolbar'] = false;SyntaxHighlighter.all();  </script>


</head>
<body class="home blog custom-background single-author two-column right-sidebar">
	<div class="hfeed" id="page">
		
		<header id="branding" role="banner">
			<nav id="access" role="navigation">
 
		<div class="menu">
			<ul class="menu" id="menu">
			 		<li><a href="${home}"><c:out
										value="${lognav.navName}" />主页
						</a>
					</li>
					
					<li><a href="${home}/blog/list"><c:out value="${lognav.navName}" />博客
						</a>
					</li>
					<s:if test="%{#session.userMsg==null}">
					<li style="float: right;"><s:a action="go_register" namespace="/user">注册
						</s:a>
					</li>
					<li style="float: right;"><s:a action="login" namespace="/user">登陆
						</s:a>
					</li>
					</s:if>
					<s:else>
					<li style="float: right;">
							<a data-toggle="dropdown" href="${home}/user/home" class="dropdown-toggle">
								<span class="user-info">
									<s:property value="%{#session.userMsg.userName}"/>
									
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<s:if test="#session.messages.total>0">
									<li>
									<a href="${home }/user/messageCentre">
										有消息&nbsp;&nbsp;(<s:property value="%{#session.messages.total}"/>)
									</a>
								</li>
									
								</s:if>
								<li>
									<a href="${home }/user/details/homeSetting">
										<i class="icon-cog"></i>
										设置
									</a>
								</li>

								<li>
									<a  href="${home }/user/details/homeSetting">
										<i class="icon-user"></i>
										个人资料
									</a>
								</li>
								
								<li>
									<a  href="${home }/blog/write">
										<i class="icon-user"></i>
										撰写博客
									</a>
								</li>


								<li>
									<a href="${home }/user/logout">
										<i class="icon-off"></i>
										退出
									</a>
								</li>
							</ul>
						</li>
					
					</s:else>

			</ul>
		</div>
		</nav> 
		<hgroup>
		<h1 id="site-title">
			<span><a title="%{#application.webSite.title}" href="${home }" rel="home"><s:property value="%{#application.webSite.title}" /></a></span>
		</h1>
		<h2 id="site-description"><s:property value="%{#application.webSite.title}" /></h2>
		</hgroup>
		<form id="searchform" action="${home }/search/blog" method="post">
			<label class="assistive-text" for="s">搜索</label> <input name="keywords" class="field" id="s" type="text" placeholder="<c:out value="${sessionscope.keywords}" default="请输入关键字" />" value="<c:out value="${sessionscope.keywords}" default="请输入关键字" />"/> 
			<input name="submit" class="submit" id="searchsubmit" type="submit" value="<c:out value="${sessionscope.keywords}" default="请输入关键字" />"/>
		</form>
	</header>
	
 